1. Field of the Invention
This invention relates to the field of computer software, and, more specifically, to optimizing network traffic.
Portions of the disclosure of this patent document contain material that is subject to copyright protection. The copyright owner has no objection to the facsimile reproduction by anyone of the patent document or the patent disclosure as it appears in the Patent and Trademark Office file or records, but otherwise reserves all copyright rights whatsoever. Sun, Sun Microsystems, the Sun logo, Solaris, Java, JavaOS, JavaStation, Hotjava Views and all Javabased trademarks and logos are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries.
2. Background Art
In a computer network environment, a computer user (client) may try to obtain a file from a central storage location (server). Existing schemes can waste time looking for the file and can often use an inefficient delivery method to provide the file to the user. These problems can be understood by reviewing networks and how they work.
A. Networks
In modem computing environments, it is commonplace to employ multiple computers or workstations linked together in a network to communicate between, and share data with, network users. A network also may include resources, such as printers, modems, file servers, etc., and may also include services, such as electronic mail. Transferring information across a network may be a time consuming process. The prior art does not provide an efficient manner to optimize the transfer and retrieval of information on a network.
A network can be a small system that is physically connected by cables or via wireless communication (a local area network or xe2x80x9cLANxe2x80x9d), or several separate networks can be connected together to form a larger network (a wide area network or xe2x80x9cWANxe2x80x9d). Other types of networks include the internet, telcorn networks, the World Wide Web, intranets, extranets, wireless networks, and other networks over which electronic, digital, and/or analog data may be communicated.
The Internet is a client/server system. A xe2x80x9cclientxe2x80x9d is the computer that you use to access the Internet. When you log onto the World Wide Web portion of the Internet, you view xe2x80x9cweb pagesxe2x80x9d that are stored on a remote xe2x80x9cserverxe2x80x9d computer. Information including data, files, and the web pages to be viewed are often transferred between the client and the server. Depending on the type of information transferred, the server or client may have to evaluate the information prior to processing. Additionally, one method for transferring the data may be more efficient than another method depending on the type of data being transferred. Some background on the Internet helps provide an understanding of these problems.
The Internet is a worldwide network of interconnected computers. An Internet client accesses a computer on the network via an Internet provider. An Internet provider is an organization that provides a client (e.g., an individual or other organization) with access to the Internet (via analog telephone line or Integrated Services Digital Network line, for example). A client can, for example, download a file from or send an electronic mail message to another computer/client using the Internet. An Intranet is an internal corporate or organizational network that uses many of the same communications protocols as the Internet. The terms Internet, World Wide Web (WWW), and Web as used herein includes the Intranet as well as the Internet.
The components of the WWW include browser software, network links, and servers. The browser software, or browser, is a user-friendly interface (i.e., front-end) that simplifies access to the Internet. A browser allows a client to communicate a request without having to learn a complicated command syntax, for example. A browser typically provides a graphical user interface (GUI) for displaying information and receiving input. Examples of browsers currently available include Netscape Navigator and Internet Explorer.
A browser displays information to a client or user as pages or documents. A language called Hypertext Markup Language (HTML) is used to define the format for a page to be displayed in the browser. A Web page is transmitted to a client as an HTML document. The browser executing at the client parses the document and produces and displays a Web Page based on the information in the HTML document. Consequently, the HTML document defines the Web Page that is rendered at runtime on the browser.
B. Network Communication/Data Transfer
Information servers maintain the information on the WWW and are capable of processing a client request. To enable the computers on a network including the WWW to communicate with each other, a set of standardized rules for exchanging the information between the computers, referred to as a xe2x80x9cprotocolxe2x80x9d, is utilized. Transfer Protocols generally specify the data format, timing, sequencing, and error checking of data transmissions. Numerous transfer protocols are used in the networking environment. For example, one family of transfer protocols is referred to as the transmission control protocol/internet protocol (xe2x80x9cTCP/IPxe2x80x9d). The TCP/IP family of transfer protocols is the set of transfer protocols used on the internet and on many multiplatform networks.
1. Transfer Protocols
The TCP/IP transfer protocol family is made up of numerous individual protocols (e.g., file transfer protocol (xe2x80x9cFTPxe2x80x9d), transmission control protocol (xe2x80x9cTCPxe2x80x9d), and network terminal protocol (xe2x80x9cTELNETxe2x80x9d)). The TCP protocol is responsible for breaking up a message to be transmitted into datagrams of manageable size, reassembling the datagrams at the receiving end, resending any datagrams that get lost (or are not transferred), and reordering the data (from the datagrams) in the appropriate order. A datagram is a unit of data or information (also referred to as a packet) that is transferred or passed across the internet. A datagram contains a source and destination address along with the data. The TCP transfer protocol is often utilized to transmit large amounts of information because of its ability to break up the information into datagrams and reassemble the information at the receiving end.
Another transfer protocol that is utilized to control the transfer of information is the user datagram protocol (xe2x80x9cUDPxe2x80x9d). UDP is designed for applications and data transmissions where sequences of datagrams do not need to be reassembled at the receiving end. UDP does not keep track of what has been transmitted in order to resend a datagram if necessary. Additionally, UDP""s header information (information regarding the source and destination and other relevant information) is shorter than the header information utilized in TCP.
2. Application Protocols
To utilize a Transfer Protocol to transfer information, an Application Protocol that defines a set of commands which one machine sends to another is utilized (e.g., commands to specify who the sender of the message is, who it is being sent to, and the text of the message). The Transfer Protocol (e.g., TCP or UDP) is utilized to ensure that the Application Protocol commands are completely transmitted to the receiving end. HyperText Transfer Protocol (HTTP) is the standard application protocol for communication with an information server on the WWW. HTTP has communication methods that allow clients to request data from a server and send information to the server.
To submit a request, the client contacts the HTTP server and transmits the request to the HTTP server. The request contains the communication method requested for the transaction (e.g., GET an object from the server or POST data to an object on the server). The HTTP server responds to the client by sending a status of the request and the requested information. The connection is then terminated between the client and the HTTP server.
A client request therefore, consists of establishing a connection between the client and the HTTP server, performing the request, and terminating the connection. The HTTP server does not need to maintain any state about the connection once it has been terminated. HTTP is, therefore, a stateless application protocol. That is, a client can make several requests of an HTTP server, but each individual request is treated independent of any other request. The server has no recollection of any previous request. The server does not need to retain state from a prior request.
3. Proxies
Instead of transmitting the information from the server that maintains the information, some systems utilize what is referred to as a proxy. Referring to FIG. 1, a proxy 102 is a server that carries out requests transmitted to it (i.e., from client 100), keeping copies of fetched documents or information for some time so that they can be accessed more quickly in the future, speeding up access for commonly requested information. This maintaining of information and fetched documents by the proxy 102 is referred to as caching and the information maintained in the proxy 102 is referred to as a cache or proxy cache.
A proxy 102 may be viewed as an intermediary between the server 104 and client 100. Referring to FIG. 1 and FIG. 2, at step 202, the client 100 requests information. At step 204, the request is forwarded to the proxy 102. At step 206, the client 100 first checks the proxy cache to see if the relevant information is maintained by the proxy 102. If the proxy cache contains the information, the client 100 does not need to contact the server 104 and loads the information directly from the proxy 102 at step 208. Alternatively, if the proxy cache does not contain the relevant information, the request is forwarded to the server 104 at step 210. At step 212, the client 100 retrieves the information from the server 104. When http is the protocol that is being transmitted over the internet protocol, the proxy 102 is referred to as a web proxy.
To protect information in internal computer networks from external access, a firewall is utilized. A firewall is a mechanism that blocks access between the client and the server. To provide limited access to information, a proxy or proxy server may sit atop a firewall and act as a conduit, providing a specific connection for each network connection. Proxy software retains the ability to communicate with external sources, yet is trusted to communicate with the internal network. For example, proxy software may require a username and password to access certain sections of the internal network and completely block other sections from any external access.
C. Addressing Scheme and Client/Server Data Retrieval
An addressing scheme is employed to identify Internet resources (e.g., HTTP server, file or program). This addressing scheme is called Uniform Resource Locator (URL). A URL may contain the application protocol to use when accessing the server (e.g., HTTP), the Internet domain name (also referred to as the server host name) of the site on which the server is running, the port number of the server (the port number may not be specified in the URL but obtained by translating the server host name), and the location of the resource in the file structure of the server. For example, the URL xe2x80x9chttp://www.sunlabs.com/research/hsn/index.htmlxe2x80x9d specifies the application protocol (xe2x80x9chttpxe2x80x9d), the server host name (xe2x80x9cwww.sunlabs.comxe2x80x9d), and the filename to be retrieved (xe2x80x9c/research/hsn/index.htmlxe2x80x9d).
If the client request is for a file, the HTTP server locates the file and sends it to the client. An HTTP server also has the ability to delegate work to Common Gateway Interface (CGI) programs. The CGI specification defines the mechanisms by which HTTP servers communicate with gateway programs. A gateway program is referenced using a URL. The HTTP server activates the program specified in the URL and uses CGI mechanisms to pass program data sent by the client to the gateway program. Data is passed from the server to the gateway program via command-line arguments, standard input, or environment variables. The gateway program processes the data, generates an HTML document, and returns the HTML document as its response to the server using CGI (via standard input, for example). The server forwards the HTML document to the client using the HTTP.
Once files have been retrieved, the client may utilize or process the file. For example, if a HTML document is retrieved, a client""s web browser may parse the HTML document and display the document. Depending on the type of file retrieved, the client may activate an application to process the file. For example, if a word processing document is retrieved, the client may activate a word processor to process the document. Alternatively, if an image file is retrieved, an image viewer may be activated to process and display the image.
To identify the type of file that is retrieved so that the client may know how to process the file subsequent to retrieval, a file suffix or extension may be utilized. A file extension or suffix often consists of a period xe2x80x9c.xe2x80x9d and several letters that are attached to the end of a file name. For example, an HTML document may end with the suffix xe2x80x9c.htmxe2x80x9d or xe2x80x9c.htmlxe2x80x9d (e.g., xe2x80x9cindex.htmlxe2x80x9d or xe2x80x9chome.htmlxe2x80x9d), a word processing document filename may end with the suffix xe2x80x9c.docxe2x80x9d (e.g., xe2x80x9creport.docxe2x80x9d or xe2x80x9cletter.docxe2x80x9d), a JPEG (Joint Photographic Experts Group) image filename may end with the suffix xe2x80x9c.jpgxe2x80x9d (e.g., xe2x80x9cimage.jpgxe2x80x9d or xe2x80x9cpicture.jpgxe2x80x9d), and a postscript document (document created in the postscript page description language) may end with the suffix xe2x80x9c.psxe2x80x9d (e.g., xe2x80x9ccalendar.psxe2x80x9d or xe2x80x9cfont.psxe2x80x9d).
Upon receiving a file, the client browser will typically examine the extension to determine how to process the file after receipt (e.g., launch an application program to process the file).
The above described methods are slow and inefficient in retrieving a file from the client or server. For example, with a web proxy, the client first searches the web proxy cache for the relevant web pages or information and if not present then processes the request with the server requiring a second search. Additionally, although it may be more efficient to utilize a UDP transfer protocol instead of TCP (i.e., for smaller files), this is not done. Referring to FIG. 3, the prior art first attempts to transfer information using UDP at step 302. At step 304, a determination is made regarding whether UDP was acceptable and was utilized to transmit the requested information. If the transfer attempt failed and UDP was not acceptable, the web browser will attempt the transfer using TCP at step 306. (Repetitively attempting a transfer with an improper transfer protocol creates a large overhead. Further, the prior art does not provide for an efficient method to optimize the retrieval of a file or information from a server or client). If the transfer using UDP is acceptable, the transfer proceeds using UDP at step 309.
A method and apparatus for encoding characteristics for the retrieval of information. In a network of computers, clients and servers communicate and exchange data and information. Depending on characteristics of the data or information, certain methods for exchanging or retrieving the information may be preferred. For example, if the information is too large to utilize a UDP (User Datagram Protocol) transfer protocol, then the TCP (Transmission Control Protocol) transfer protocol may be preferred. In addition, if the information is not cacheable, then it is preferable to retrieve the information directly from the server instead of searching the cache first.
A URL (Uniform Resource Locator) is utilized on the internet to specify the application protocol (e.g., http), the domain name (e.g., www.sun.com), and file location (e.g., /users/hcn/index.html). The suffix of a file indicator is utilized to identify how to process the data or information subsequent to retrieval.
One or more embodiments of the invention provide for encoding characteristics of data to be transferred that indicates or hints at an optimal method to retrieve the data. For example, the URL may specify that TCP is the preferred transfer protocol, thereby avoiding an attempted transfer using UDP. Additionally, the encoding may specify that the data is not cacheable so that the client may retrieve the information directly from the server instead of searching the proxy cache. This encoded information may be published by the server and parsed by the client prior to executing data retrieval. Thus, the client may retrieve the data efficiently, decreasing the overhead utilized influencing the behavior of the data transfer over a network.
The characteristics or preferred retrieval method may be encoded in a any portion of a URL. Additionally, one or more embodiments of the invention provide for backwards compatibility with existing internet browsers by encoding the characteristics in the file location portion of the URL instead of the application protocol identifier portion.